package com.jxc.model.po;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 角色资源权限
 * 
 * @author Tino
 * 
 */
@Entity
@Table(name = "QXGL_ROLE_RESOURCE")
public class RoleResource extends IdEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1157003422333531573L;
	/**
	 * 角色
	 * 
	 */
	private Role role;
	/**
	 * 资源
	 * 
	 */
	private Resource resource;

	@ManyToOne
	@JoinColumn(name = "ROLE_ID")
	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	@ManyToOne
	@JoinColumn(name = "RESOURCE_ID")
	public Resource getResource() {
		return resource;
	}

	public void setResource(Resource resource) {
		this.resource = resource;
	}

}
